-- GENERATED SPELL FOR [Electromental] --


function spell0_21729(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(37273,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21729', 2000, 1)
end

function spell1_21729(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(38465,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21729', 2000, 1)
end

function Sorts_21729(pUnit, Event)
local choix_sorts_21729 = math.random(0, 1)
if choix_sorts_21729 == 0 then
pUnit:RegisterEvent('spell0_21729', 1, 1)
end
if choix_sorts_21729 == 1 then
pUnit:RegisterEvent('spell1_21729', 1, 1)
end
end

function mob21729_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21729', math.random(1500, 3000), 1)
end

function mob21729_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21729_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21729_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21729, 1, 'mob21729_Action')
RegisterUnitEvent(21729, 2, 'mob21729_Leave')
RegisterUnitEvent(21729, 3, 'mob21729_Kill')
RegisterUnitEvent(21729, 4, 'mob21729_Die')
